package com.bicon.botu.finance.wallet.rpc;

import com.bicon.botu.core.base.common.controller.BaseController;
import com.bicon.botu.core.base.common.entity.BaseResult;
import com.bicon.botu.finance.wallet.service.WalletService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 钱包rpc
 * @author tandk
 * @date 2017/9/15 0015 上午 9:49
 */
@RestController
@RequestMapping("/V3.0.0/rpc/wallet")
public class WalletRpcV3 extends BaseController{


    @Autowired
    private WalletService walletService;

    /**
     *
     * @param module    平台
     * @param business  业务
     * @param money     退款金额
     * @param remark    备注
     * @param code      应用编号
     * @param orderNo 订单编号
     * @param refundNo   退款编号
     * @return
     */
    @RequestMapping(value = "/toRefund", method = RequestMethod.POST)
    public BaseResult toRefund(String module, String business, String money, String remark, String code, String orderNo, String refundNo, String refundReason) {
        return sendResult200(walletService.toRefund(module, business, money, remark, code, orderNo, refundNo, refundReason));
    }
}
